package com.xu.mall.user.orgunit.model;

import java.io.Serializable;

import com.xu.mall.base.tree.entity.BaseTreeEntity;

/**
 * 组织单元
 * 
 * @version Revision History
 * 
 *          <pre>
 * Author     Version       Date        Changes
 * lunan.xu   1.0           2012-10-28  Created
 * </pre>
 * 
 * @since 1.
 */
public class OrgUnit extends BaseTreeEntity implements Serializable {
	private static final long serialVersionUID = 3292628090007742152L;

	private static final String CODE_HEAD = "ORG_";

	//组织类型
	private Long orgTypeId;
	//负责岗位
	private Long mainPosition;

	@Override
	public void setCode(String code) {
		super.code = code.startsWith(CODE_HEAD) ? code : CODE_HEAD + code;
	}

	public Long getOrgTypeId() {
		return orgTypeId;
	}

	public void setOrgTypeId(Long orgTypeId) {
		this.orgTypeId = orgTypeId;
	}

	public Long getMainPosition() {
		return mainPosition;
	}

	public void setMainPosition(Long mainPosition) {
		this.mainPosition = mainPosition;
	}

}